//
//  RNOLMeClaimTransferViewController.m
//  RongNiuOnline
//
//  Created by apple on 2018/4/20.
//  Copyright © 2018年 rongniu. All rights reserved.
//

#import "RNOLMeClaimTransferViewController.h"
#import "RNOLMeClaimTransferSubViewController.h"

@interface RNOLMeClaimTransferViewController ()

@end

@implementation RNOLMeClaimTransferViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = kBgColor;
    [self setupNavBarTitleViewWithText:@"债权转让"];
    [RNOLLoginTool setNavgationBarNeedAnimation:YES];
    self.minYPullUp = 0;
    self.maxYPullDown = 0;
}

/**
 控制器继承 SPCoverController
 此方法返回的是标题栏 标题
 */
- (NSString *)titleForIndex:(NSInteger)index
{
    return @[@"可转让债权",@"转让的债权",@"认购的债权"][index];
}


- (CGFloat)tabWidthForIndex:(NSInteger)index{
    return KWIDTH/3.0;
}

/**
 下面联动的ChildController控制器的数量
 */
- (NSInteger)numberOfControllers
{
    return 3;
}

- (CoverScrollStyle)preferCoverStyle{
    return CoverScrollStyleTop;
}

- (CGFloat)preferTabY{
    return 0;
}

/**
 下面联动的ChildController控制器
 */
- (UIViewController *)controllerAtIndex:(NSInteger)index
{
    RNOLMeClaimTransferSubViewController *coverController = [[RNOLMeClaimTransferSubViewController alloc] init];
    coverController.view.frame = [self preferPageFrame];
    RNOLClaimTransferType type = (RNOLClaimTransferType)index;
    coverController.type = type;
    return coverController;
}

//页面切换已在SPTabcontroller 实现
- (void)didPressTabForIndex:(NSInteger)index{
    [super didPressTabForIndex: index];
    
}

//横向滑动
- (void)scrollViewContentOffsetWithRatio:(CGFloat)ratio draging:(BOOL)draging{
    [super scrollViewContentOffsetWithRatio:ratio draging:draging];

}


@end
